Copy generation method and apparatus, and electronic device, storage medium and program

ABSTRACT

A copy generation method and apparatus, an electronic device, a computer storage medium and a computer program product. The method comprises: acquiring first attribute data of a commodity (100); determining first key attribute data of the commodity on the basis of a pre-trained first copy generation model, wherein the first key attribute data represents part of the first attribute data (101); obtaining a first candidate copy set for the commodity according to the first key attribute data, wherein the first candidate copy set represents a set of at least one piece of commodity copy (102); and screening candidate copy data according to a quality determination rule, and determining a target commodity copy, wherein the candidate copy data comprises the commodity copy in the first candidate copy set (103).

CROSS-REFERENCE TO RELATED APPLICATION

The application is filed based upon and claims priority to ChinesePatent Application No. 202011219419.8, filed on Nov. 4, 2020 by BeijingWodong Tianjun Information Technology Co., Ltd., and entitled “METHODAND DEVICE FOR GENERATING COPY, ELECTRONIC DEVICE, STORAGE MEDIUM ANDPROGRAM”, the present disclosure of which is hereby incorporated byreference in its entirety.

TECHNICAL FIELD

The present disclosure relates to the field of copy description, andrelates to, but is not limited to, a method and device for generating acopy, an electronic device, a computer storage medium and a computerprogram product.

BACKGROUND

With the development of mobile Internet, the e-commerce industry hasdeveloped rapidly. More and more users are used to shopping on theInternet. Due to the popularity of the mobile Internet, users spend moretime browsing commodities on the Internet. In order to attract users,higher requirements are put forward for contents of e-commercemerchants. In order to attract users, e-commerce platforms and sellerswill provide long copy descriptions for a product in addition to a titleof the product, and describe the selling points of the product, so thatusers can quickly and deeply understand the characteristics of theproduct. High-quality product description is a key to improve customerexperience. Accurate and attractive descriptions can not only helpcustomers make formal decisions, but also improve the possibility ofpurchase.

In related art, in order to write a high-quality copy, there arerelatively high requirements for a person to write a copy, which notonly requires high cost, but also has low efficiency when the copy iswritten by manual and cannot quickly cover a large number ofcommodities. In addition, due to a lack of accurate measurement methodsfor a generated long copy of a commodity, it is difficult to ensure thequality of the long copy of the commodity and a fit degree between thelong copy and the commodity.

SUMMARY

The present disclosure provides a method and device for generating acopy, an electronic device and a computer storage medium.

The technical scheme of the present disclosure is implemented asfollows.

Embodiments of the present disclosure provide a method for generating acopy, including:

-   -   acquiring first attribute data of a commodity;    -   determining first key attribute data of the commodity based on a        first copy generation model trained in advance, where the first        key attribute data represents a part of attribute data of the        first attribute data;    -   obtaining a first candidate copy set of the commodity according        to the first key attribute data, where the first candidate copy        set represents a set of at least one commodity copy; and    -   screening candidate copy data according to a quality        determination rule to determine a target commodity copy, where        the candidate copy data includes one or more commodity copies in        the first candidate copy set.

In some embodiments, the operation of obtaining the first candidate copyset of the commodity according to the first key attribute data includes:

-   -   generating a copy description for the first key attribute data        in a sentence-wise manner according to the first key attribute        data, where each piece of the first key attribute data        corresponds to at least one copy description;    -   splicing the at least one copy description corresponding to each        piece of the first key attribute data to generate at least one        commodity copy; and    -   obtaining the first candidate copy set of the commodity based on        the at least one commodity copy.

In some embodiments, the operation of obtaining the first candidate copyset of the commodity based on the at least one commodity copy includes:

-   -   determining at least one of a duplication degree or a        consistency for each commodity copy to obtain a determination        result, where the duplication degree represents a degree of        duplication between different copy descriptions in each        commodity copy, and the consistency represents a consistency        degree between attribute data of each commodity copy and the        first attribute data; and    -   obtaining the first candidate copy set of the commodity        according to the determination result.

In some embodiments, the first copy generation model is trained by:

-   -   acquiring a historical copy and second attribute data of the        commodity;    -   matching the second attribute data with the historical copy to        obtain second key attribute data;    -   taking the historical copy, the second attribute data and the        second key attribute data as training data; and    -   training the first copy generation model by using the training        data to obtain a trained first copy generation model.

In some embodiments, the first copy generation model includes: a firstdecoder and a second decoder, where the first decoder is configured todecode the second attribute data to obtain the second key attributedata, and the second decoder is configured to generate a copydescription corresponding to the second key attribute data.

In some embodiments, the operation of training the first copy generationmodel by using the training data to obtain the trained first copygeneration model includes:

-   -   adjusting network parameters of the first decoder by using a        dual attention mechanism and adjusting network parameters of the        second decoder by using a coverage mechanism, to obtain the        trained first copy generation model.

In some embodiments, the operation of screening the candidate copy dataaccording to the quality determination rule includes:

-   -   after obtaining the first attribute data of the commodity,        inputting the first attribute data into at least two copy        generation models to obtain a second candidate copy set of the        commodity, where the at least two copy generation models        includes the first copy generation model; and    -   screening the candidate copy data according to the quality        determination rule, where the candidate copy data includes        commodity copies in the second candidate copy set.

In some embodiments, the quality determination rule includes at leastone of:

-   -   screening quality of the commodity copies based on a duplication        degree, where the duplication degree represents a degree of        duplication between different copy descriptions in each        commodity copy;    -   screening the quality of the commodity copies based on        consistency, where the consistency represents a consistency        degree between the attribute data of each commodity copy and the        first attribute data;    -   screening the quality of the commodity copies based on a        perplexity, where the perplexity represents a clarity degree of        each copy description of each commodity copy; or    -   screening the quality of the commodity copies based on an        attribute coverage degree, where the attribute coverage degree        represents a degree of coverage of the first attribute data in        each commodity copy.

Embodiments of the present disclosure also provide a device forgenerating a copy including an acquiring module, a first determiningmodule, a second determining module and a screening module.

The acquiring module is configured to acquire first attribute data of acommodity.

The first determining module is configured to determine first keyattribute data of the commodity based on a first copy generation modeltrained in advance, where the first key attribute data represents a partof attribute data of the first attribute data.

The second determining module is configured to obtain a first candidatecopy set of the commodity according to the first key attribute data,where the first candidate copy set represents a set of at least onecommodity copy.

The screening module is configured to screen candidate copy dataaccording to a quality determination rule to determine a targetcommodity copy, where the candidate copy data includes one or morecommodity copies in the first candidate copy set.

Embodiments of the present disclosure provide an electronic deviceincluding a memory, a processor and computer programs stored on thememory and executable on the processor. The processor is configured toimplement the method provided by one or more technical schemes whenexecuting the programs.

Embodiments of the present disclosure provide a computer storage mediumhaving stored thereon computer programs that, when executed by aprocessor, cause the processor to implement the method for generating acopy provided by the one or more technical schemes.

Embodiments of the present disclosure also provide a computer programproduct including computer readable codes, where a processor in anelectronic device is configured to implement the method for generating acopy provided by the one or more technical schemes when thecomputer-readable codes are executed in the electronic device.

The embodiments of the present disclosure provide a method and devicefor generating a copy, an electronic device, a computer storage mediumand a computer program product. The method includes: first attributedata of a commodity is acquired; first key attribute data of thecommodity is determined based on a first copy generation model trainedin advance, where the first key attribute data represents a part ofattribute data of the first attribute data; a first candidate copy setof the commodity is obtained according to the first key attribute data,where the first candidate copy set represents a set of at least onecommodity copy; and candidate copy data is screened according to aquality determination rule to determine a target commodity copy, wherethe candidate copy data includes one or more commodity copies in thefirst candidate copy set. In this way, the commodity copy does not needto be written by manual, and instead, it is automatically generateddirectly based on attribute data of a commodity and the first copygeneration model trained in advance, which can improve the generationefficiency of the commodity copy. Furthermore, the generated commoditycopies are screened according to the quality determination rule, whichcan ensure the quality of the commodity copy and the fit degree betweenthe commodity copy and the commodity.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and constitute apart of this specification, illustrate embodiments consistent with thepresent disclosure and, together with the description, serve to explainthe technical solutions in the embodiments of the present disclosure.

FIG. 1 is a schematic flowchart of a method for generating a copyaccording to an embodiment of the present disclosure;

FIG. 2 is a schematic diagram of a result of copy output by a first copygeneration model according to an embodiment of the present disclosure;

FIG. 3 is a schematic structural diagram of a copy generation frameworkaccording to an embodiment of the present disclosure;

FIG. 4 is a schematic structural diagram of a first copy generationmodel according to an embodiment of the present disclosure;

FIG. 5 a is a schematic structural diagram of a copy generationapparatus according to the embodiment of the present disclosure;

FIG. 5 b is a schematic structural diagram of another copy generationdevice according to the embodiment of the present disclosure;

FIG. 6 is a schematic structural diagram of an electronic deviceaccording to an embodiment of the present disclosure.

DETAILED DESCRIPTION

Various exemplary embodiments, features and aspects of the presentdisclosure will be described below in detail with reference to theaccompanying drawings. The same reference signs in the drawingsrepresent components with the same or similar functions. Although eachaspect of the embodiments is shown in the drawings, the drawings are notrequired to be drawn to scale, unless otherwise specified.

The present disclosure is described in further detail below inconjunction with the accompanying drawings and embodiments. It should beunderstood that the embodiments provided herein are intended only toexplain the present disclosure and are not intended to limit it. Inaddition, the embodiments provided below are for implementing some ofthe embodiments of the present disclosure, rather than providing all ofthe embodiments of the present disclosure, and the technical solutionsdescribed in the embodiments of the present disclosure can beimplemented in any combination without conflict.

It is to be noted that, in this disclosure, the terms “include”,“including” or any other variation thereof, are intended to cover anon-exclusive inclusion, such that a method or device that includes alist of elements includes not only those elements but also otherelements not expressly listed, or also includes elements inherent tosuch method or device. Without more limitations, an element defined bythe statement “including a . . . ” does not rule out additionalidentical elements in a method or device that includes the element (suchas an operation in the method or a unit in the device, for example, theunit may be a part of a circuit, a part of a processor, a part of aprogram or software, etc.).

In the present disclosure, the term “and/or” is only an associationrelationship describing associated objects and represents that threerelationships may exist. For example, I and/or J may represent threeconditions, i.e., independent existence of I, existence of both I and J,and independent existence of J. In addition, the term “at least one”herein means any one of multiple elements, or any combination of atleast two of the multiple elements, for example, including at least oneof I, J or R may means including any one or more elements selected fromthe set composed of I, J and R.

For example, the method for generating a copy provided by theembodiments of the present disclosure includes a series of operations.However, the method for generating a copy provided by the embodiments ofthe present disclosure is not limited to the described operations,Likewise, the device for generating a copy provided by the embodimentsof the present disclosure includes a series of operations, but thedevice for generating a copy provided by the embodiments of the presentdisclosure is not limited to including the modules explicitly described,and may also include modules required to be provided for acquiringrelevant time sequence data or performing processing based on the timesequence data.

Embodiments of the present disclosure may be applied to a computersystem consisting of a terminal device and a server, and may operatewith numerous other general-purpose or special-purpose computing systemenvironments or configurations. Herein, the terminal device may be athin client, a thick client, a handheld or laptop device, amicroprocessor-based system, a set-top box, a programmable consumerelectronics product, a networked personal computer, a minicomputersystem or the like. The server may be a server computer system, a smallcomputer system, a large computer system, a distributed cloud computingtechnology environment including any of the above systems, or the like.

Electronic devices such as the terminal device and the server may bedescribed in the general context of computer system executableinstructions (such as program modules) executed by the computer system.Generally, the program modules can include routines, programs, objectprograms, components, logic, data structures, and so on, which performspecific tasks or implement specific abstract data types. The computersystem/server may be implemented in a distributed cloud computingenvironment in which tasks are performed by remote processing deviceslinked through a communication network. In the distributed cloudcomputing environment, program modules may be located on a storagemedium of a local or remote computing system that includes storagedevices.

In view of the above technical problems, the following embodiments areproposed.

In some embodiments of the present disclosure, the method for generatinga copy can be implemented by a processor in a device for generating acopy. The processor can be at least one of: an Application SpecificIntegrated Circuit (ASIC), a Digital Signal Processor (DSP), a DigitalSignal Processing Device (DSPD), a Programmable Logic Device (PLD), aField Programmable Gate Array (FPGA), a Central Processing Unit (CPU), acontroller, a microcontroller, or a microprocessor.

FIG. 1 is a schematic flowchart of a method for generating a copyaccording to an embodiment of the present disclosure. As shown in FIG. 1, the method includes operations 100 to 103.

In operation 100, first attribute data of a commodity is acquired.

Herein, the commodity can represent any type of goods traded bye-commerce platforms or sellers through the Internet. For example, thecommodity can be clothing items, food items or the like, or it may bevirtual items or the like. The types of goods are not limited inembodiments of the present disclosure.

In the embodiments of the present disclosure, the first attribute datamay include attribute words and attributes of the commodity. Theattribute words can be words or phrases describing characteristics ofthe commodity, and the attributes represent words that correspond to theattribute words and can be distinguished from attributes correspondingto other attribute words. A data form of each piece of the attributedata in the first attribute data is attribute word|attribute, forexample, off shoulder|collar type, sleeveless|sleeve length, roundcollar|collar type, splicing|popular element.

In some embodiments, a source of the first attribute data may include atleast one of: a commodity title, a commodity category, or extendedinformation of commodity.

In an implementation, the first attribute data of the commodity can beobtained by performing a series of processing procedures such as wordsegmentation and part-of-speech tagging on the source of the firstattribute data. The above processing procedures can be implemented by asequence tagging model. The implementation can include: firstly, theword segmentation is performed on the input commodity title, commoditycategory or extended information of commodity to obtain all wordsequences; a sequence tagging is performed on each word sequenceaccording to a meaning of the word sequence and context contents,herein, each word sequence corresponds to a distinct attribute word, anda content of the sequence tagging corresponds to the attributes of eachattribute word; and furthermore, the first attribute data of thecommodity can be obtained through the sequence tagging model.

In some embodiments, the word segmentation is a process of recombining asequence of successive characters into a word sequence according tocertain specifications, and word segmentation processing can beimplemented by word segmentation tools or word segmentation algorithms.Herein, the specific implementation manners may be set according toactual application scenarios, which are not limited in the embodimentsof the present disclosure, for example, the tool or algorithm may be thepkuseg word segmentation tool, the jieba word segmentation algorithm orthe like.

In some embodiments, the part-of-speech tagging can be calledgrammatical tagging or word-category disambiguation. The part-of-speechtagging, is a text data processing technology that tags thepart-of-speech of a word sequence obtained from the word segmentationaccording to the meaning of the word sequence and the context contents.The part-of-speech tagging can be implemented manually or by specificalgorithms.

In an implementation, before the first attribute data of the commodityis obtained, a copy generation request for the commodity sent from auser is received. The copy generation request may include a source ofthe first attribute data input by the user.

In an implementation, the extended attribute data may be obtainedrespectively from the commodity title, the commodity category and theextended information of commodity according to sources of the firstattribute data. Then the attribute data from three different sources ismerged to obtain a complete attribute data of the commodity. Theattribute data is filtered according to a preset rule to obtain theattribute data that satisfies the requirements, that is, the firstattribute data of the commodity.

In an implementation, it is assumed that the commodity categories are:apparel underwear|first class category, women's clothing|second classcategory, and dress|third class category; the title of the commodity is:XX brand original designer, women's summer wear, new temperamentmid-long irregular halter ceremonial dress skirt, sleeveless offshoulder white dress XL; and the results of the word segmentation andpart-of-speech tagging performed on the commodity title are: XX|brandword, original|style attribute, women's|auxiliary product word, summerwear|auxiliary product word, new|style attribute, temperament|styleattribute, mid-long|pattern attribute, irregular|pattern attribute,halter|pattern attribute, ceremonial dress|auxiliary product word,skirt|product word, sleeveless|pattern attribute, off shoulderpattern|attribute, white|color attribute, dress|product word, andXL|size attribute.

The extended attribute data includes: mature young women|suitableaudience, polyester|material, street shooting|style, 25-29 yearsold|suitable age, summer of 2019|time to market, middle skirt|length ofthe skirt, splicing|popular element, and high waist|waist type. Theattribute data from the above three different sources can be merged toobtain the complete attribute data of commodity.

The attribute data retained after filtering based on the preset rule:apparel underwear|first class category, women's clothing|second classcategory, dress|third class category, off shoulder|pattern attribute,mature young women|suitable audience, polyester|material, streetshooting|style, middle skirt|length of the skirt, splicing|popularelement, high waist|waist type, XX|brand word, original|style attribute,summer wear|auxiliary product word, temperament|style attribute,mid-long|pattern attribute, irregular|pattern attribute, halter|patternattribute, ceremonial dress|auxiliary product word, skirt|product word,white|color attribute, dress|product word, and round collar|collar type.

In an implementation, the preset rule can filter out a part of theattribute data of the commodity. This is because the filter-out part ofthe attribute data has no obvious effect on the subsequent generation ofthe commodity copy. By filtering out the part of attribute data, theaccuracy of the commodity copy can be ensured and the generationefficiency of the commodity copy can be improved. Herein, the presetrule can be formulated manually based on commodity characteristics.

In operations 101, first key attribute data of the commodity isdetermined based on a first copy generation model trained in advance,where the first key attribute data represents a part of attribute dataof the first attribute data.

In the embodiment of the present disclosure, the first copy generationmodel is trained in advance to obtain the trained first copy generationmodel. When the copy is to be generated, the acquired first attributedata of the commodity is used as input data of the first copy generationmodel, and the output of the first copy generation model is the copycorresponding to the commodity.

In the embodiment of the present disclosure, the copy generation processperformed by the first copy generation model mainly includes two stages:content selection and description generation. A result of the contentselection is the first key attribute data determined from the firstattribute data of the commodity. The first key attribute data representsthe content to be emphatically described in the finally output copy. Aresult of the description generation is a corresponding copy descriptiongenerated for the first key attribute data.

In an implementation, the first attribute data of the commodity, i.e.,“XX|brand word, women's|auxiliary product word, summer wear|auxiliaryproduct word, dress|product word, round collar|collar type”, is input tothe first copy generation model. If the first copy generation modeldetermines that the first key attribute data of the commodity is “roundcollar|collar type”, the output of the first copy generation model canbe “the collar is designed as an elegant round collar”.

In some embodiments, the first copy generation model is trained byacquiring a historical copy and second attribute data of the commodity;matching the second attribute data with the historical copy to obtainsecond key attribute data; taking the historical copy, the secondattribute data and the second key attribute data as training data; andtraining the first copy generation model by using the training data toobtain the trained first copy generation model.

In an implementation, the training process of the first copy generationmodel includes: the training data including the history copy, the secondattribute data and the second key attribute data is input into themodel, and network parameters of the model are continuously adjusted byusing the back propagation algorithm, so that the key attribute datadetermined by the model according to the second attribute data iscompletely the same as the second key attribute data. Furthermore, thecommodity copy generated according to the second key attribute data isas consistent as possible with the historical copy.

In an implementation, the historical copy may represent an existingrelevant copy describing the commodity, which may be a manually writtencopy or a copy obtained from a commodity copy corpus. Herein, in orderto improve the diversity of commodity copies, multiple historical copiesof the commodity can be obtained; and the sources of the multiplehistorical copies can be set according to actual application scenarios,which is not limited in the embodiments of the present disclosure.

In the embodiment of the present disclosure, the second key attributedata of the commodity is obtained by matching the second attribute datawith the historical copy, and the second key attribute data of thecommodity is used as intermediate data for the training of the firstcopy generation model. The acquisition of the second attribute data ofthe commodity is the same as the acquisition of the first attribute datain operation 100, which will not be elaborated herein.

In an implementation, it is assumed that the historical copy of thecommodity is “the overall design is simple fashion, and concise linesoutline a refined temperament, so that the temperament characteristicsof intellectual and capable are shown; the collar is designed as anelegant round collar, showing modern style in simplicity; and the waistis made of splicing design, making the waist appear to be slender andexhibiting beautiful body lines”. The second key attribute data obtainedby matching the second attribute data with the historical copy can be:temperament|style attribute, round collar|collar type, andsplicing|popular element.

In some embodiments, the first copy generation model includes: a firstdecoder and a second decoder, where the first decoder is configured todecode the second attribute data to obtain the second key attributedata, and the second decoder is configured to generate a copydescription corresponding to the second key attribute data.

Herein, the first copy generation model may be a seq2seq model, whichmay include an encoder, a first decoder and a second decoder. In thetraining process of the first copy generation model, the input data ofthe encoder is an “attribute word|attribute” pair corresponding to thesecond attribute data of the commodity. A Long Short-Term Memory (LSTM)is used as the encoder to encode the input data so as to obtain hiddenvariables, as shown in formula (1):

h _(j)=LSTM(h _(j-1) ,x _(j))  (1),

where h_(j) represents a hidden variable at moment j at the encodingend, h_(j-1) represents a hidden variable at moment j−1 at the encodingend, and x_(j) represents input data.

The second attribute data of the commodity is decoded by using the firstdecoder to determine whether the key attribute data of the commoditycorresponds to the second key attribute data. The process of decodingthe key attribute data k_(i) of the commodity is shown in formulas (2),(3) and (4):

h _(i)=LSTM(h _(i-1) ,k _(i-1))  (2),

=g(h _(i) ;c _(i))  (3),

k _(i)=arg max(soft max(

))  (4),

-   -   where h_(i-1) is a hidden state of the second attribute data at        a previous moment, k_(i-1) is the second key attribute data at        the current moment in the training stage, and the key attribute        data decoded at the previous moment in the prediction stage,        h_(i) is the hidden state of the second key attribute data at        the current moment, c_(i) is the attention context vector at the        current moment at the coding end,        is the hidden state of the attention data generated at the        current moment, and g is a transformation function.

Next, a commodity copy y corresponding to the key attribute data isgenerated by decoding using a second decoder.

In an implementation, the first copy generation model is trained in ajoint training mode in which the selection of the second key attributedata and the generation of the commodity copy are performedsimultaneously. The objective function of the model adopts the maximumlikelihood function and the objectives of the two stages aresimultaneously considered. The joint objective function is shown informula (5):

max Σ_(D) log(k|x)+log p(y|x,k)  (5),

where x, k, y represents the second attribute data of the commodity, thesecond key attribute data of the commodity and the commodity copy,respectively. In the formula above, the first term represents a targetof the decoding by the first decoder, and the second term indicatesrepresents a target of generating the copy by the second decoder.

It can be seen that the second attribute data, the second key attributedata and the historical copy are needed in the training stage of thefirst copy generation model. In the prediction stage of the first copygeneration model, attribute data is input, and the output is theprediction result.

In an implementation, in the prediction stage of the first copygeneration model, the attribute data is input, i.e., the attribute dataretained after filtering, including: apparel underwear|first classcategory, women's clothing|second class category, dress|third classcategory, off shoulder|pattern attribute, mature young women|suitableaudience, polyester|material, street shooting|style, middle skirt|lengthof the skirt, splicing|popular element, high waist|waist type, XX|brandword, original|style attribute, summer wear|auxiliary product word,temperament|style attribute, mid-long|pattern attribute,irregular|pattern attribute, halter|pattern attribute, ceremonialdress|auxiliary product word, skirt|product word, white|color attribute,dress|product word, and round collar|collar type.

The first decoder decodes key attribute words: temperament styleattribute, round collar|collar type, and splicing|popular element.

The second decoder generates the copy, i.e., the prediction result: theoverall design is simple fashion, and concise lines outline a refinedtemperament, so that the temperament characteristics of intellectual andcapable are shown; the collar is designed as an elegant round collar,showing modern style in simplicity; and the waist is made of splicingdesign, making the waist appear to be slender and exhibiting beautifulbody lines.

In some embodiments, the operation that the first copy generation modelis trained by using the training data to obtain the trained first copygeneration model includes: network parameters of the first decoder areadjusted by using a dual attention mechanism and network parameters ofthe second decoder are adjusted by using a coverage mechanism, to obtainthe trained first copy generation model.

In the embodiment of the present disclosure, in the process of trainingthe first copy generation model, the dual attention mechanism and acoverage mechanism are used to optimize the network. The dual attentionmechanism aims at the input data in the form of “attributeword|attribute” pair that is a type of “key vector|value vector” pair.In the decoding stage of the first decoder, the dual attention mechanismis adopted to calculate attention data for both the key vector and thevalue vector respectively, and attention data distribution adopted inthe final decoding stage is the result of fusion of the attention dataof the key vector and the attention data of the value vector. In thisway, the features of key vector and value vector can be usedsimultaneously, therefore the planning ability of the first copygeneration model and the reliability of the copy can be improved. If theattention data of the attribute word is designated α_(ij)(1) and theattention data of the attribute is designated as α_(ij)(2), theattention data obtained by fusing the attention data of the attributeword with the attention data of the attribute is as shown in formula(6):

$\begin{matrix}{{\alpha_{ij} = \frac{{\alpha_{ij}(1)} \cdot {\alpha_{ij}(2)}}{{\sum}_{j = 1}^{J}{{\alpha_{ij}(1)} \cdot {\alpha_{ij}(2)}}}},} & (6)\end{matrix}$

where J is a length of the encoding sequence, i is an index of thedecoding sequence at the current moment, and j is an index of theencoding sequence at the current moment.

The attention context vector c_(i) at the current moment at the encodingend is shown in formula (7):

$\begin{matrix}{{c_{i} = {\sum\limits_{j = 1}^{J}{\alpha_{ij}h_{j}}}}.} & (7)\end{matrix}$

One problem of the copy generation model is that it is easy to generateduplicative description, including literal duplication and semanticduplication. The reason for this problem is that the model repeatedlydescribes a certain input feature data. The coverage mechanism canrestrain the generation of the duplicative descriptions. The core ideaof the coverage mechanism is: the described attribute words are trackedin the process of copy generation, so that the first copy generationmodel no longer pays attention to the described attribute words.Therefore, the duplication of the commodity copy is reduced and thequality of copy is improved.

The specific operation is that, firstly, the attention context vectorc_(i) in the historical state is maintained and used as input feature tocalculate the attention data α_(ij)(1) of the attribute word and theattention data α_(ij)(2) of the attribute at the current moment, asshown in formula (8):

$\begin{matrix}{{{\alpha_{ij}(1)} = \frac{\exp\left( e_{ij} \right)}{{\sum}_{j = 1}^{J}{\exp\left( e_{{ij}^{\prime}} \right)}}},} & (8)\end{matrix}$

where j′ is an index of the encoding sequence at different moments, andthe calculation formula of α_(ij)(2) is the same as that of α_(ij)(1);e_(ij) is a weight calculated to measure the relationship between thehidden state h_(i) of the second key attribute data at the current timeat the decoding end and the hidden variable h_(j) at moment j at theencoding end.

For words with an excessive weight that repeatedly appear, anappropriate penalty is given in the loss function, as shown in formula(9):

covloss_(j)=Σ_(i) min(α_(ij) ,c _(ij))  (9),

where c_(ij) it is a result of accumulating the attention contextvectors at different moments at the coding end.

In operation 102, a first candidate copy set of the commodity isobtained according to the first key attribute data, where the firstcandidate copy set represents a set of at least one commodity copy.

In the embodiment of the present disclosure, after the first keyattribute data is obtained, the first copy generation model can generatea copy description for the first key attribute data according to thefirst key attribute data. Herein, there may be one or more copydescriptions generated corresponding to each piece of key attributedata.

In an implementation, for the first key attribute data “roundcollar|collar type”, the corresponding copy description generated by thefirst copy generation model may be “the collar is designed as a roundcollar”; and can also be “the collar of the dress is designed as anelegant round collar” or the like.

In some embodiments, the operation that the first candidate copy set ofthe commodity is obtained according to the first key attribute datainclude: a copy description for the first key attribute data isgenerated in a sentence-wise manner according to the first key attributedata, where each piece of the first key attribute data corresponds to atleast one copy description; the at least one copy descriptioncorresponding to each piece of the first key attribute data is splicedto generate at least one commodity copy; and the first candidate copyset of the commodity is obtained based on the at least one commoditycopy.

In an implementation, since a corresponding copy description can begenerated for each piece of key attribute data, multiple different copydescriptions can be generated corresponding to the first key attributedata in a case where the first key attribute data includes multiplepieces of attribute data. By splicing the multiple different copydescriptions, multiple commodity copies can be obtained, and then thefirst candidate copy set of commodity can be obtained.

In an implementation, it is assumed that the first key attribute dataincludes an attribute M and an attribute N, a copy description 1 and acopy description 2 can be generated according to attribute M, and a copydescription 3 can be generated according to the attribute N. By splicingthe description 1 and the copy description 3, and splicing the copydescription 2 and the copy description 3, two copies can be finallyobtained, and these two copies are taken as the first candidate copyset.

In some embodiments, the operation that the first candidate copy set ofthe commodity is obtained based on the at least one commodity copyincludes: at least one of a duplication degree or a consistency for eachcommodity copy is determined to obtain a determination result, where theduplication degree represents a degree of duplication between differentcopy descriptions in each commodity copy, and the consistency representsa consistency degree between attribute data of each commodity copy andthe first attribute data; and the first candidate copy set of thecommodity is obtained according to the determination result.

In the embodiments of the present disclosure, after splicing differentcopy descriptions of the key attribute data, the duplication degreeand/or the consistency of each spliced commodity copy can also bedetermined. This process is mainly implemented in a beam search stage ofthe first copy generation model.

The determination of the duplication degree is a literal duplicationdetermination and a semantic level determination of the word vector foreach commodity copy, i.e., which determines whether there are successiveand duplicated characters, words or sub-sentences and semanticallyduplicated sub-sentences. The consistency determination is adetermination for the attribute words, the consistency degree betweenthe attribute word of each commodity copy and each attribute word of thefirst attribute data is determined, i.e., it is determined whether thegenerated copy includes an attribute word that does not exist in theinput data. The attribute word can be obtained by matching the attributevocabulary with the generated copy, and the attribute vocabulary can beobtained by corpus statistics.

In the beam search stage of predicting commodity copy through the firstcopy generation model, a hard rule method may be adopted to determinethe duplication degree between different copy descriptions in eachcommodity copy to obtain a determination result. If the determinationresult shows that there are duplicated characters, words orsub-sentences or semantically duplicated sub-sentences between thegenerated copy descriptions, the commodity copy is deleted. That is tosay, only when the determination result shows that there is noduplication between any different copy descriptions in the generatedcommodity copy, the commodity copy can be output.

Furthermore, the consistency degree between the attribute word of eachcommodity copy and each attribute word of the first attribute data isdetermined to obtain a determination result. If the determination resultshows that the generated commodity copy includes an attribute word thatdoes not exist in the input data, the commodity copy is deleted. That isto say, only when the determination result shows that all attributewords included in the generated commodity copy correspond to theattribute words in the input data, the commodity copy can be output.

FIG. 2 is a schematic diagram of a result of a copy output by a firstcopy generation model according to an embodiment of the presentdisclosure. As shown in FIG. 2 , the commodity attributes are the inputdata of the first copy generation model, and the commodity copy obtainedand output after decoding is a generation result without thedeterminations of the duplication degree and the consistency. It can beseen that “high waist” in the generation result is inconsistent with theinput data of the first copy generation model, and there is duplicationbetween “more comfortable to wear” and “making your wearing morecomfortable”. After the determinations of the duplication degree and theconsistency are added, “high waist” is replaced with “middle waist” and“making your wearing more comfortable” is replaced with “doubling yourfashion sense”. It can be seen that by adding the determinations of theduplication degree and the consistency, the wrong description in thegenerated results of the first copy generation model can be corrected,and the quality of the commodity copy can be improved.

In operation 103, candidate copy data is screened according to a qualitydetermination rule to determine a target commodity copy, where thecandidate copy data includes one or more commodity copies in the firstcandidate copy set.

In the embodiment of the present disclosure, after the first candidatecopy set is obtained, the commodity copies in the first candidate copyset are screened based on the quality determination rule, and thefinally output target commodity copy is determined.

Herein, the quality determination rule includes at least one of: qualityof the commodity copies is screened based on a duplication degree, wherethe duplication degree represents a degree of duplication betweendifferent copy descriptions in each commodity copy; the quality of thecommodity copies is screened based on consistency, where the consistencyrepresents a consistency degree between the attribute data of eachcommodity copy and the first attribute data; the quality of thecommodity copies is screened based on a perplexity, where the perplexityrepresents a clarity degree of each copy description of each commoditycopy; or the quality of the commodity copies is screened based on anattribute coverage degree, where the attribute coverage degreerepresents a degree of coverage of the first attribute data in eachcommodity copy.

In an implementation, the commodity copies in the first candidate copyset may be filtered based on the duplication degree. The duplicationdegree includes literal duplication and semantic duplication. For theliteral duplication, it can be determined whether there is duplicationbetween different copy descriptions in each commodity copy byestablishing rules, such as duplication of adjacent characters or words,duplication of sub-sentences, and duplication of attribute words. Forthe semantic duplication, if similar words or similar sub-sentences arefound through a manner of training the word2vec, it is determined thatthere is duplication between the commodity copies.

In an implementation, the commodity copies in the first candidate copyset may be filtered based on the consistency. Ensuring the consistencyof the input data and the output data is a basic requirement for thefirst copy generation model, thus in addition to optimization of themodel to generate a consistent description, in order to ensure theconsistency between the attribute data of the finally output copy andthe input data (i.e., the first attribute data), taking thecharacteristics of the copy data into consideration, a manner ofmatching attribute words is adopted to determine the consistency of thefinally output copy, and it is necessary to construct an attributevocabulary. It is detected whether the attribute words in the copy arein conflict with the attribute words in the input data based on theattribute vocabulary. The attribute vocabulary is constructed based onthe training data. In the construction, a proportion of the frequency ofan attribute word appearing in the copy to the frequency of theattribute word appearing in input attributes is considered; furthermore,objective attributes, such as the material attribute, are retained, andsubjective attributes, such as the pattern attribute, are deleted.

In an implementation, commodity copies in the first candidate copy setmay be sequenced based on the perplexity. The descriptions generated bythe first copy model may not be smooth. In order to measure thesmoothness of the generated copy, a perplexity index in the languagemodel is used for measuring the copy. The copies are sequenced, and thehigher the perplexity, the worse the smoothness in general.Probabilities under the binary model are counted based on existingcommodity copy data as basic data, and the perplexity index iscalculated based on a counting result. The perplexities of all candidatecopies of the current commodity are calculated based on the perplexityindex, the perplexities are taken as measurement indexes to sequence thecandidate copies in an ascending order of the perplexities, and severalcandidate copies in the front of the sequenced candidate copies aretaken as a new candidate copy set of the current commodity.

In an implementation, the commodity copies in the first candidate copyset may be sequenced based on attribute coverage degree. After theattribute data of the commodity obtained from multiple informationsources, such as the title and the extended attribute, are filtered, theretained attribute data is used as the input of the copy generationmodel. A goal of the generated copy includes describing the inputattributes specifically and attracting the purchase interest of users.The quality of the commodity copy can be determined according to thenumber of input attribute words included in the generated copy. The morethe input attribute words described, the higher the score of thecommodity copy, and the better the quality of the copy.

In some embodiments, the operation that the candidate copy data isscreened according to the quality determination rule may include: afterthe first attribute data of the commodity is obtained, the firstattribute data is input into at least two copy generation models toobtain a second candidate copy set of the commodity, where the at leasttwo copy generation models includes the first copy generation model; andthe candidate copy data is screened according to the qualitydetermination rule, where the candidate copy data includes commoditycopies in the second candidate copy set.

In the process of generating the copy, besides the trained first copygeneration model, other copy generation models can also be adopted. Thatis to say, various copy generation models are compatible with thetechnical scheme of the embodiment of the present disclosure.

For the task of generating the commodity copy, instead of relying solelyon a certain end-to-end copy generation model, the copy corresponding tothe commodity is generated based on various copy generation models toobtain the second candidate copy set of the commodity; and then thecommodity copies in the second candidate copy set are screened based onthe quality determination rule to output commodity copies satisfying therequirements. It can be seen that the accuracy and the recall of thecommodity copies generated in this way can satisfy actual requirementsof the industry.

It can be seen that the candidate copy data is screened through theabove-mentioned four aspects of the quality determination rule includingduplication degree, consistency, perplexity and attribute coveragedegree, thus not only problematic commodity copies are filtered out, butalso a copy with high confidence and high coverage is retained as thefinal output to ensure the quality of the commodity copy.

The embodiments of the present disclosure provide a method and devicefor generating a copy, an electronic device, a computer storage mediumand a computer program product. The method includes: first attributedata of a commodity is acquired; first key attribute data of thecommodity is determined based on a first copy generation model trainedin advance, where the first key attribute data represents a part ofattribute data of the first attribute data; a first candidate copy setof the commodity is obtained according to the first key attribute data,where the first candidate copy set represents a set of at least onecommodity copy; and candidate copy data is screened according to aquality determination rule to determine a target commodity copy, wherethe candidate copy data includes one or more commodity copies in thefirst candidate copy set. In this way, the commodity copy does not needto be written by manual, and instead, it is automatically generateddirectly based on attribute data of a commodity and the first copygeneration model trained in advance, which can improve the generationefficiency of the commodity copy. Furthermore, the generated commoditycopies are screened according to the quality determination rule, whichcan ensure the quality of the commodity copy and the fit degree betweenthe commodity copy and the commodity.

In order to better embody the purpose of the present disclosure, furtherillustration and description is made on the basis of the above-describedembodiments of the present disclosure.

FIG. 3 is a schematic structural diagram of a copy generation frameworkaccording to an embodiment of the present disclosure. As shown in FIG. 3, the framework includes three modules: a commodity informationfiltering module, a copy generation module and a copy optimizationmodule. The commodity information filtering module is configured to:obtain a commodity category, a brand name, a product word and severalmodifiers which can accurately reflect commodity characteristics frommulti-source commodity information such as commodity title, commoditycategory and extended information of commodity; extract attribute dataincluding attribute words and attributes from the category, the brandname, the product word and modifiers; and filter the acquired attributedata to extract attribute information (that is, the first attributedata) of the commodity for generating the copy.

The copy generation module is configured to sort and screen, based onthe first copy generation model, the first attribute data output by thecommodity information filtering module to determine the first keyattribute data of the commodity. The dual attention mechanism andcoverage mechanism are used in the training stage of the first copygeneration model, and the beam search is used in the prediction stage ofthe first copy generation model. Multiple candidate copies are generatedby adopting the first copy generation model, and the duplication degreeand/or the consistency for each commodity copy is determined. Theduplication degree represents a degree of duplication between differentcopy descriptions in each commodity copy, and the consistency representsa consistency degree between attribute data of each commodity copy andthe first attribute data. All candidate copies after optimization (i.e.,the first candidate copy set) are obtained according to a determinationresult.

The copy optimization module is configured to filter out the problematiccommodity copies in the first candidate copy set based on theduplication degree and the consistency, sequence the commodity copies inthe first candidate copy set based on the perplexity and the attributecoverage degree, and retain several commodity copies with highconfidence and high coverage as a final output, i.e., the targetcommodity copies.

FIG. 4 is a schematic structural diagram of a first copy generationmodel according to an embodiment of the present disclosure. As shown inFIG. 4 , the process flow of predicting by using the first copygeneration model is as follows. The acquired first attribute data“attribute word|attribute” of the commodity, for example,“V-collar|collar type”, as the input data is input into the encoder;attention data is respectively calculated for the attribute word and theattribute by using the dual attention mechanism, and the attention dataof attribute word corresponding to each piece of attribute data is fusedthe attention data of the attribute corresponding to the attribute databased on the context vector to obtain weight distribution of theattention data of each piece of attribute data; and the first decoder isused to decode the attribute data to obtain the first key attribute dataK1, and the second decoder is used to decode the copy to obtain the copydescription corresponding to each piece of key attribute data.

FIG. 5 a is a schematic structural diagram of a device for generating acopy according to an embodiment of the present disclosure. As shown inFIG. 5 a , the device includes an acquiring module 500, a firstdetermining module 501, a second determining module 502 and a screeningmodule 503 where.

The acquiring module 500 is configured to acquire first attribute dataof a commodity.

The first determining module 501 is configured to determine first keyattribute data of the commodity based on a first copy generation modeltrained in advance, where the first key attribute data represents a partof attribute data of the first attribute data.

The second determination module 502 is configured to obtain a firstcandidate copy set of the commodity according to the first key attributedata, where the first candidate copy set represents a set of at leastone commodity copy.

The screening module 503 is configured to screen candidate copy dataaccording to a quality determination rule to determine a targetcommodity copy, where the candidate copy data includes one or morecommodity copies in the first candidate copy set.

In some embodiments, the second determining module 502 configured toobtain the first candidate copy set of the commodity according to thefirst key attribute data is specifically configured to:

-   -   generate a copy description for the first key attribute data in        a sentence-wise manner according to the first key attribute        data, where each piece of the first key attribute data        corresponds to at least one copy description;    -   splice the at least one copy description corresponding to each        piece of the first key attribute data to generate at least one        commodity copy; and    -   obtain the first candidate copy set of the commodity based on        the at least one commodity copy.

In some embodiments, the second determination module 502 configured toobtain the first candidate copy set of the commodity according to thefirst key attribute data is specifically configured to:

-   -   determine at least one of a duplication degree or a consistency        for each commodity copy to obtain a determination result, where        the duplication degree represents a degree of duplication        between different copy descriptions in each commodity copy, and        the consistency represents a consistency degree between        attribute data of each commodity copy and the first attribute        data; and    -   obtain the first candidate copy set of the commodity according        to the determination result.

FIG. 5 b is a schematic structural diagram of a device for generating acopy according to another embodiment of the present disclosure. As shownin FIG. 5 b , the device further includes a training module 504.

The training module 504 is configured to obtain a historical copy andsecond attribute data of the commodity.

The training module 504 is configured to match the second attribute datawith the historical copy to obtain second key attribute data.

The training module 504 is configured to take the historical copy, thesecond attribute data and the second key attribute data as trainingdata.

The training module 504 is configured to train the first copy generationmodel by using the training data to obtain a trained first copygeneration model.

In some embodiments, the first copy generation model includes: a firstdecoder and a second decoder, where the first decoder is configured todecode the second attribute data to obtain the second key attributedata, and the second decoder is configured to generate a copydescription corresponding to the second key attribute data.

In some embodiments, the training module 504 configured to train thefirst copy generation model by using the training data to obtain thetrained first copy generation model is specifically configured to:

-   -   adjust network parameters of the first decoder by using a dual        attention mechanism and adjust network parameters of the second        decoder by using a coverage mechanism, to obtain the trained        first copy generation model.

In some embodiments, the screening module 503 configured to screencandidate copy data according to the quality determination rule todetermine the target commodity copy is specifically configured to:

-   -   after obtaining the first attribute data of the commodity, input        the first attribute data into at least two copy generation        models to obtain a second candidate copy set of the commodity,        where the at least two copy generation models includes the first        copy generation model; and    -   screen the candidate copy data according to the quality        determination rule, where the candidate copy data includes        commodity copies in the second candidate copy set.

In some embodiments, the quality determination rule includes at leastone of the following.

The quality of the commodity copies is screened based on a duplicationdegree, where the duplication degree represents a degree of duplicationbetween different copy descriptions in each commodity copy.

The quality of the commodity copies is screened based on consistency,where the consistency represents a consistency degree between theattribute data of each commodity copy and the first attribute data.

The quality of the commodity copies is screened based on a perplexity,where the perplexity represents a clarity degree of each copydescription of each commodity copy.

The quality of the commodity copies is screened based on an attributecoverage degree, where the attribute coverage degree represents a degreeof coverage of the first attribute data in each commodity copy.

In practical applications, the acquiring module 500, the firstdetermining module 501, the second determining module 502, the screeningmodule 503, and the training module 504 may all be implemented by aprocessor located in an electronic device. The processor may be at leastone of an ASIC, a DSP, a DSPD, a PLD, an FPGA, a CPU, a controller, amicrocontroller, and a microprocessor.

In addition, each functional unit in each embodiment of the presentdisclosure may be integrated in one processing unit, each unit may existphysically alone, or two or more units may be integrated in one unit.The integrated unit may be implemented in the form of hardware or in theform of software functional units.

If the integrated unit is implemented in the form of a software functionunit and sold or used as an independent product, it can be stored in acomputer readable storage medium. Based on such understanding, thetechnical solution of the present disclosure, in essence or in the formof a software product, which is stored in a storage medium, includesseveral instructions for making a computer device (which can be apersonal computer, a server, a network device, etc.) or a processor toperform all or part of the steps of the method according to eachembodiment of the present disclosure. The aforementioned storage mediainclude: U disk, mobile hard disk, read-only memory (ROM), random accessmemory (RAM), disk or optical disk and other media that can storeprogram code.

Specifically, the computer program instructions corresponding to themethod for generating a copy in the embodiments can be stored on astorage medium such as an optical disk, a hard disk, a U disk, etc. Whenthe computer program instructions corresponding to a method forgenerating a copy in the storage medium are read or executed by anelectronic device, any method for generating a copy in the embodimentsis implemented.

Based on the same technical concept of the previous embodiments, withreference to FIG. 6 , an electronic device 600 provided by the presentdisclosure is shown. The electronic device 600 may include a memory 601and a processor 602.

The memory 601 is configured to store computer programs and data.

The processor 602 is configured to execute computer programs stored inmemory to implement any of the methods for generating a copy of theforegoing embodiments.

In practical applications, the above-mentioned memory 601 may be avolatile memory, such as RAM; or a non-volatile memory, such as ROM,flash memory, Hard Disk Drive (HDD) or Solid-State Drive (SSD); or acombination of the kinds of memories described above. The memory 601 isconfigured to provide instructions and data to the processor 602.

The processor 602 may be at least one of an ASIC, a DSP, a DSPD, a PLD,an FPGA, a CPU, a controller, a microcontroller, and a microprocessor.It is to be understood that the electronic devices for implementing theprocessor functions described above may be other for different devicesfor generating a copy, which is not limited in the embodiments of thepresent disclosure.

In some embodiments, the function or included module of the apparatusprovided by the embodiment of the present disclosure may be configuredto execute the method described in the above method embodiments, and thespecific implementation may refer to the description in the above methodembodiments. For the simplicity, the details are not elaborated herein.

The above description of the various embodiments tends to emphasize thedifferences between the various embodiments, the similarities of whichmay be referred to each other and will not be repeated herein for thesake of brevity.

The methods disclosed in the method embodiments provided in thedisclosure can be arbitrarily combined without conflict to obtain newmethod embodiments.

The features disclosed in the product embodiments provided in thisdisclosure can be arbitrarily combined without conflict to obtain newproduct embodiments.

The features disclosed in the method or apparatus embodiments providedin this disclosure can be arbitrarily combined without conflict toobtain new method embodiments or apparatus embodiments.

Those skilled in the art will appreciate that embodiments of the presentdisclosure may be provided as methods systems or computer programproducts. Accordingly the present disclosure may take the form of ahardware embodiment a software embodiment or an embodiment combiningsoftware and hardware aspects. Furthermore, the present disclosure maytake the form of a computer program product implemented on one or morecomputer-usable storage media (including, but not limited to, diskstorage, optical storage, etc.) including computer-usable program codetherein.

The present disclosure is described with reference to flowcharts and/orblock diagrams of methods, devices (systems), and computer programproducts of the embodiments of the present disclosure. It should beunderstood that a computer program instruction is configured toimplement each flow and/or block in the flowcharts and/or blockdiagrams, and the combination of flows/blocks in the flowcharts and/orblock diagrams. These computer program instructions may be provided to auniversal computer, a special computer, an embedded processor orprocessors of other programmable data processing devices to generate amachine such that an apparatus for implementing the functions specifiedin one or more flow in the flowcharts and/or one or more blocks in theblock diagrams is generated through the instructions executed by thecomputer or the processor of other programmable data processing devices.

These computer program instructions may also be loaded in a computer orother programmable data processing devices such that a series ofoperation steps are executed on the computer or other programmable dataprocessing devices to generate computer implemented processing, and thusthe instruction executed on the computer or other programmable dataprocessing devices provides the operations for implementing thefunctions specified in one or more flows in the flowchart and/or one ormore blocks in the block diagram.

The above is only preferred embodiments of the present disclosure and isnot intended to limit the scope of protection of the present disclosure.

1. A method for generating a copy, comprising: acquiring first attribute data of a commodity; determining first key attribute data of the commodity based on a first copy generation model trained in advance, wherein the first key attribute data represents a part of attribute data of the first attribute data; obtaining a first candidate copy set of the commodity according to the first key attribute data, wherein the first candidate copy set represents a set of at least one commodity copy; and screening candidate copy data according to a quality determination rule to determine a target commodity copy, wherein the candidate copy data comprises one or more commodity copies in the first candidate copy set.
 2. The method of claim 1, wherein obtaining the first candidate copy set of the commodity according to the first key attribute data comprises: generating a copy description for the first key attribute data in a sentence-wise manner according to the first key attribute data, wherein each piece of the first key attribute data corresponds to at least one copy description; splicing the at least one copy description corresponding to each piece of the first key attribute data to generate at least one commodity copy; and obtaining the first candidate copy set of the commodity based on the at least one commodity copy.
 3. The method of claim 2, wherein obtaining the first candidate copy set of the commodity based on the at least one commodity copy comprises: determining at least one of a duplication degree or a consistency for each commodity copy to obtain a determination result, wherein the duplication degree represents a degree of duplication between different copy descriptions in each commodity copy, and the consistency represents a consistency degree between attribute data of each commodity copy and the first attribute data; and obtaining the first candidate copy set of the commodity according to the determination result.
 4. The method of claim 1, wherein the first copy generation model is trained by: acquiring a historical copy and second attribute data of the commodity; matching the second attribute data with the historical copy to obtain second key attribute data; taking the historical copy, the second attribute data and the second key attribute data as training data; and training the first copy generation model by using the training data to obtain a trained first copy generation model.
 5. The method of claim 4, wherein the first copy generation model comprises: a first decoder and a second decoder, wherein the first decoder is configured to decode the second attribute data to obtain the second key attribute data, and the second decoder is configured to generate a copy description corresponding to the second key attribute data.
 6. The method of claim 5, wherein training the first copy generation model by using the training data to obtain the trained first copy generation model comprises: adjusting network parameters of the first decoder by using a dual attention mechanism and adjusting network parameters of the second decoder by using a coverage mechanism, to obtain the trained first copy generation model.
 7. The method of claim 1, wherein screening the candidate copy data according to the quality determination rule comprises: after obtaining the first attribute data of the commodity, inputting the first attribute data into at least two copy generation models to obtain a second candidate copy set of the commodity, wherein the at least two copy generation models comprises the first copy generation model; and screening the candidate copy data according to the quality determination rule, wherein the candidate copy data comprises commodity copies in the second candidate copy set.
 8. The method of claim 1, wherein the quality determination rule comprises at least one of: screening quality of the commodity copies based on a duplication degree, wherein the duplication degree represents a degree of duplication between different copy descriptions in each commodity copy; screening the quality of the commodity copies based on consistency, wherein the consistency represents a consistency degree between the attribute data of each commodity copy and the first attribute data; screening the quality of the commodity copies based on a perplexity, wherein the perplexity represents a clarity degree of each copy description of each commodity copy; or screening the quality of the commodity copies based on an attribute coverage degree, wherein the attribute coverage degree represents a degree of coverage of the first attribute data in each commodity copy.
 9. A device for generating a copy, comprising: a memory storing processor-executable instructions; and a processor arranged to execute the processor-executable instructions to perform operations of: acquiring first attribute data of a commodity; determining first key attribute data of the commodity based on a first copy generation model trained in advance, wherein the first key attribute data represents a part of attribute data of the first attribute data; obtaining a first candidate copy set of the commodity according to the first key attribute data, wherein the first candidate copy set represents a set of at least one commodity copy; and screening candidate copy data according to a quality determination rule to determine a target commodity copy, wherein the candidate copy data comprises one or more commodity copies in the first candidate copy set.
 10. The device of claim 9, wherein obtaining the first candidate copy set of the commodity according to the first key attribute data comprises: generating a copy description for the first key attribute data in a sentence-wise manner according to the first key attribute data, wherein each piece of the first key attribute data corresponds to at least one copy description; splicing the at least one copy description corresponding to each piece of the first key attribute data to generate at least one commodity copy; and obtaining the first candidate copy set of the commodity based on the at least one commodity copy.
 11. The device of claim 10, wherein obtaining the first candidate copy set of the commodity according to the first key attribute data comprises: determining at least one of a duplication degree or a consistency for each commodity copy to obtain a determination result, wherein the duplication degree represents a degree of duplication between different copy descriptions in each commodity copy, and the consistency represents a consistency degree between attribute data of each commodity copy and the first attribute data; and obtaining the first candidate copy set of the commodity according to the determination result.
 12. The device of claim 9, wherein the first copy generation model is trained by: acquiring a historical copy and second attribute data of the commodity; matching the second attribute data with the historical copy to obtain second key attribute data; taking the historical copy, the second attribute data and the second key attribute data as training data; and training the first copy generation model by using the training data to obtain a trained first copy generation model.
 13. The device of claim 12, wherein the first copy generation model comprises: a first decoder and a second decoder, wherein the first decoder is configured to decode the second attribute data to obtain the second key attribute data, and the second decoder is configured to generate a copy description corresponding to the second key attribute data.
 14. The device of claim 13, wherein training the first copy generation model by using the training data to obtain the trained first copy generation model comprises: adjusting network parameters of the first decoder by using a dual attention mechanism and adjust network parameters of the second decoder by using an coverage mechanism, to obtain the trained first copy generation model.
 15. The device of claim 9, wherein screening candidate copy data according to the quality determination rule to determine the target commodity copy comprises: after obtaining the first attribute data of the commodity, inputting the first attribute data into at least two copy generation models to obtain a second candidate copy set of the commodity, wherein the at least two copy generation models comprises the first copy generation model; and screening the candidate copy data according to the quality determination rule, wherein the candidate copy data comprises commodity copies in the second candidate copy set.
 16. The device of claim 9, wherein the quality determination rule comprises at least one of: screening quality of the commodity copies based on a duplication degree, wherein the duplication degree represents a degree of duplication between different copy descriptions in each commodity copy; screening the quality of the commodity copies based on consistency, wherein the consistency represents a consistency degree between the attribute data of each commodity copy and the first attribute data; screening the quality of the commodity copies based on a perplexity, wherein the perplexity represents a clarity degree of each copy description of each commodity copy; or screening the quality of the commodity copies based on an attribute coverage degree, wherein the attribute coverage degree represents a degree of coverage of the first attribute data in each commodity copy.
 17. (canceled)
 18. A non-transitory computer storage medium having stored thereon processor-executable instructions that, when executed by a processor, cause the processor to implement a method for generating a copy, the method comprising: acquiring first attribute data of a commodity; determining first key attribute data of the commodity based on a first copy generation model trained in advance, wherein the first key attribute data represents a part of attribute data of the first attribute data; obtaining a first candidate copy set of the commodity according to the first key attribute data, wherein the first candidate copy set represents a set of at least one commodity copy; and screening candidate copy data according to a quality determination rule to determine a target commodity copy, wherein the candidate copy data comprises one or more commodity copies in the first candidate copy set.
 19. (canceled)
 20. The non-transitory computer storage medium of claim 18, wherein obtaining the first candidate copy set of the commodity according to the first key attribute data comprises: generating a copy description for the first key attribute data in a sentence-wise manner according to the first key attribute data, wherein each piece of the first key attribute data corresponds to at least one copy description; splicing the at least one copy description corresponding to each piece of the first key attribute data to generate at least one commodity copy; and obtaining the first candidate copy set of the commodity based on the at least one commodity copy.
 21. The method of claim 7, wherein the quality determination rule comprises at least one of: screening quality of the commodity copies based on a duplication degree, wherein the duplication degree represents a degree of duplication between different copy descriptions in each commodity copy; screening the quality of the commodity copies based on consistency, wherein the consistency represents a consistency degree between the attribute data of each commodity copy and the first attribute data; screening the quality of the commodity copies based on a perplexity, wherein the perplexity represents a clarity degree of each copy description of each commodity copy; or screening the quality of the commodity copies based on an attribute coverage degree, wherein the attribute coverage degree represents a degree of coverage of the first attribute data in each commodity copy.
 22. The device of claim 15, wherein the quality determination rule comprises at least one of: screening quality of the commodity copies based on a duplication degree, wherein the duplication degree represents a degree of duplication between different copy descriptions in each commodity copy; screening the quality of the commodity copies based on consistency, wherein the consistency represents a consistency degree between the attribute data of each commodity copy and the first attribute data; screening the quality of the commodity copies based on a perplexity, wherein the perplexity represents a clarity degree of each copy description of each commodity copy; or screening the quality of the commodity copies based on an attribute coverage degree, wherein the attribute coverage degree represents a degree of coverage of the first attribute data in each commodity copy. 